package com.game;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.view.MotionEvent;
import android.view.SurfaceHolder;

public abstract class Scene {
	
	protected SceneManager	 	mParentSM;
	protected SurfaceHolder 	mSurfaceHolder;
	protected Context 			mContext;
	
	public Scene(SceneManager parent)
	{
		mParentSM = parent;
		mContext = mParentSM.getThread().getContext();
		mSurfaceHolder = mParentSM.getThread().getSurface();
	}

	public abstract void End();

	public abstract void Start() ;

	public abstract void Draw(Canvas canvas);

	public abstract void Update();
	
	public abstract boolean handleTouch(MotionEvent event);
	
	protected Bitmap LoadBitmap(int imgRef)
	{
		return BitmapFactory.decodeResource(mContext.getResources(), imgRef);
	}

}
